﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HighlightNewsInCategory2.ascx.cs" Inherits="GUI.Controls.Sport.HighlightNewsInCategory2" %>
<div class="noibat1 clearfix">
    <div class="top-item fl">

        <asp:Literal runat="server" ID="ltrTopItem"></asp:Literal>
    </div>
    <ul class="w150 fr clearfix">
        <asp:Literal runat="server" ID="ltrRight"></asp:Literal>
    </ul>
</div>
<ul class="noibat2 clearfix mgt35">
    <asp:Literal runat="server" ID="ltrBottomItem"></asp:Literal>
</ul>
<script type="text/javascript">
    $(document).ready(function () {
        var boxNoiBat = $(".noibat1:first");
        if (boxNoiBat && boxNoiBat.length > 0) {
            var left = boxNoiBat.find(".top-item:first");
            var right = boxNoiBat.find("ul:first");
            right.find("li:first").addClass("first");
            var maxHeight = Math.max(left.height(), right.height());
            var diff = 0;
            if (left.height() < maxHeight) {
                diff = maxHeight - left.height();
                left.find(".desc p:first").height(function () {
                    return left.find(".desc p:first").height() + diff;
                });
            } else if (right.height() < maxHeight) {
                diff = maxHeight - right.height();
                var headings = right.find("h2");
                headings.each(function () {
                    $(this).height($(this).height() + diff / headings.length);
                });
            }
        }
        var boxNoiBat2 = $(".noibat2");
        if (boxNoiBat2 && boxNoiBat2.length > 0) {
            boxNoiBat2.find("li:odd").addClass("mgl40");
            var nb2p = boxNoiBat2.find("li p");
            if (nb2p && nb2p.length > 0) {
                boxNoiBat2.find("li p").height(function () {
                    var maxheight = 0;
                    nb2p.each(function () {
                        if (maxheight < $(this).height()) {
                            maxheight = $(this).height();
                        }
                    });
                    return maxheight;
                });
            }
        }
    });
</script>

